#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 5;
int tianji[maxn], qiwang[maxn];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> tianji[i];
  }
  for (int i = 1; i <= n; i++) {
    cin >> qiwang[i];
  }
  sort(tianji + 1, tianji + 1 + n);
  sort(qiwang + 1, qiwang + 1 + n);
  int l1 = 1, r1 = n;
  int l2 = 1, r2 = n;
  int ans = 0;
  while (l1 <= r1) {
    if (tianji[l1] > qiwang[l2]) {
      ans++;
      l1++;
      l2++;
    } else if (tianji[r1] > qiwang[r2]) {
      ans++;
      r1--;
      r2--;
    } else {
      if (tianji[l1] < qiwang[r2]) {
        ans--;
      }
      l1++;
      r2--;
    }
  }
  cout << ans << endl;
  return 0;
}